package me.firstapp.spi.system;

import java.util.Map;

import me.firstapp.common.json.PageObject;
import me.firstapp.common.json.SingleObject;
import me.firstapp.common.module.system.JsonEmailConfig;

public interface EmailConfigService {

	/**
	 * 新增email配置
	 * 
	 * @param apiUrl
	 * @param apiUser
	 * @param apiKey
	 * @param mailFrom
	 * @return
	 */
	SingleObject<JsonEmailConfig> addEmailConfig(String apiUrl, String apiUser, String apiKey, String mailFrom);

	/**
	 * 更新email配置
	 * 
	 * @param id
	 * @param apiUrl
	 * @param apiUser
	 * @param apiKey
	 * @param mailFrom
	 * @param status
	 * @return
	 */
	SingleObject<JsonEmailConfig> updateEmailConfig(Long id, String apiUrl, String apiUser, String apiKey,
			String mailFrom, Integer status);

	/**
	 * 分页查询email配置
	 * 
	 * @param pageNo
	 * @param pageSize
	 * @param searchParams
	 * @param sortParam
	 * @param sortType
	 * @return
	 */
	PageObject<JsonEmailConfig> findEmailConfigPage(Integer pageNo, Integer pageSize, Map<String, Object> searchParams,
			String sortParam, String sortType);

	/**
	 * 删除email配置
	 * 
	 * @param ids
	 * @return
	 */
	SingleObject<Object> deleteEmailConfigs(String ids);

	/**
	 * 通过id查询email配置
	 * 
	 * @param id
	 * @return
	 */
	SingleObject<JsonEmailConfig> findEmailConfigById(Long id);
}
